import 多渠道发送.AliyunSmsStrategy;
import 多渠道发送.TencentCloudSmsStrategy;
import 多渠道发送.SmsSendingStrategy;

public class Main {
    public static void main(String[] args) {
        /*创建短信发送对象*/
        SmsSender smsSender = new SmsSender();

        /*设置使用阿里云的方式发送短信*/
        SmsSendingStrategy aliyunSmsStrategy = new AliyunSmsStrategy();
        smsSender.setStrategy(aliyunSmsStrategy);
        aliyunSmsStrategy.sendSms("手机号", "短信内容");

        /*设置使用腾讯云的方式进行发送*/
        TencentCloudSmsStrategy tencentCloudSmsStrategy = new TencentCloudSmsStrategy();
        smsSender.setStrategy(tencentCloudSmsStrategy);
        tencentCloudSmsStrategy.sendSms("手机号", "短信内容");

    }
}